<template>
  <svg class="icon-symbol" aria-hidden="true" v-if="isSymbol">
    <use :xlink:href="`#${icon}`"></use>
  </svg>
  <i :class="icon" v-else></i>
</template>

<script>
export default {
  name: 'IconSymbol',
  props: {
    icon: { // 图标
      type: String,
      required: true
    },
    isSymbol: { // 
      type: Boolean,
      default: false
    }
  },

}
</script>

<style lang="scss">
  .icon-symbol {
    width: 1em;
    height: 1em;
    overflow: hidden;
    vertical-align: -0.15em;
    // fill: currentColor;
  }
</style>